package com.beiding.dao.impl;

import com.beiding.dao.ResourceOperations;
import com.beiding.pojo.User;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class UserDaoImpl implements ResourceOperations<User> {

    private MongoTemplate mongoTemplate;

    public UserDaoImpl(MongoTemplate mongoTemplate) {
        this.mongoTemplate = mongoTemplate;
    }

    @Override
    public Class<User> type() {
        return User.class;
    }

    @Override
    public MongoOperations mongoOperations() {
        return mongoTemplate;
    }

}